package com.fdb.efp.limit.service.dao;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.fdb.basic.framework.core.base.DataOptionalAuthorityDao;
import com.fdb.efp.limit.service.domain.LmtIndivApp;
import com.fdb.efp.limit.service.vo.LmtIndivAppVO;
/**
 * <p>DAO interface:个人授信申请表				<p>
 * @author chenqm1
 * @date 2018-05-05
 */
public interface LmtIndivAppDao extends DataOptionalAuthorityDao {
	
	public int insertLmtIndivApp(LmtIndivApp lmtIndivApp);
	
	public int deleteByPk(LmtIndivApp lmtIndivApp);
	
	public int updateByPk(LmtIndivApp lmtIndivApp);
	
	public LmtIndivApp queryByPk(LmtIndivApp lmtIndivApp);
	
	public int updateLmtIndivAppStatus(LmtIndivApp lmtIndivApp);
	
	public List<LmtIndivApp> queryAllOwnerByPage(LmtIndivAppVO lmtIndivApp);
	
	public List<LmtIndivApp> queryAllCurrOrgByPage(LmtIndivAppVO lmtIndivApp);
	
	public List<LmtIndivApp> queryAllCurrDownOrgByPage(LmtIndivAppVO lmtIndivApp);
	
	/**
	 * 额度申请进度查询
	 * @param lmtIndivApp
	 * @param approveStatusArr
	 * @param actStsArr
	 * @return
	 */
	public List<LmtIndivApp> queryIndivProcess(@Param("lmtIndivApp")LmtIndivApp lmtIndivApp,
			@Param("approveStatusArr")String[] approveStatusArr);
	
	public List<LmtIndivApp> queryByCondition(LmtIndivAppVO lmtIndivApp);
	
	/**
     * 查询批复有效天数列表
     * @return
     */
    public List<Integer> queryApproveValidDays();
    
    public String getLatestRejectDate(LmtIndivApp lmtIndivApp);
    
    public int getApplyCount(LmtIndivApp lmtIndivApp);
    
    /**
     * 查询批复过期的授信申请记录
     * @param validDays
     * @param createDate
     * @return
     */
    public List<LmtIndivApp> queryLmtIndivApp4Invalid(@Param("validDays") int validDays, @Param("createDate") String createDate);
}
